package com.bjpowernode.test07;

import java.util.Arrays;
import java.util.Random;

public class Pai {
    public static void main(String[] args) {
        String[] pais = getPai();
//        System.out.println(Arrays.toString(pais));
        //随机打出三张牌
        Random random = new Random();
        for (int i=0;i<3;i++){
            System.out.println(pais[random.nextInt(pais.length)]);
        }
    }

    public static String[] getPai(){
        //定义数组，存牌
        String[] strings = new String[52];
        for (int i=1;i<14;i++){
            strings[i-1]="方块"+i;
        }
        for (int i=1;i<14;i++){
            strings[i+12]="红心"+i;
        }
        for (int i=1;i<14;i++){
            strings[i+25]="黑桃"+i;
        }
        for (int i=1;i<14;i++){
            strings[i+38]="梅花"+i;
        }
        return strings;
    }

}
